﻿using System;
using System.Collections.Generic;
using BolaoDNA.DomainModel;
using BolaoDNA.Repositories;
using Web.Generics;

namespace BolaoDNA.Repositories.NHibernate
{
	public partial class UsuarioCadastradoRepository : GenericNHibernateRepository<UsuarioCadastrado>, IUsuarioCadastradoRepository
	{
        public UsuarioCadastrado SelectByUsername(string username)
        {
            var filterParameters = new FilterParameters();
            filterParameters.FilterConditions.Add(new FilterCondition { Property="Email", Comparer=FilterCondition.ComparerType.eq, Value=username });
            return base.Select(filterParameters)[0];
        }
    }
}
